package Book;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 周斌
 * Date: 2024-01-08
 * Time: 21:53
 */
public class book {
    private String name;//书的名字
    private String author;//书的作者
    private double price;//书的价格
    private String type;//书的类型
    private Boolean islend;//书是否被借出
    //通过Get和Set方法得到book的属性

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Boolean getIslend() {
        return islend;
    }

    public void setIslend(Boolean islend) {
        this.islend = islend;
    }
    //构造方法
    public book(String name, String author, double price, String type) {
        this.name = name;
        this.author = author;
        this.price = price;
        this.type = type;
    }
    //重写ToString方法

    @Override
    public String toString() {
        return "book{" +
                "name='" + name + '\'' +
                ", author='" + author + '\'' +
                ", price=" + price +
                ", type='" + type + '\'' +
                ", islend=" + islend +
                '}';
    }
}
